"""
lviewer.filechange

Tools for watching for file changes
"""
from lviewer.filechange import basic, pyinotify

def FileChangeMonitor(folder):
    """
    A file change monitor follows a directory to see if any files change
    
    its constructor takes a directory to follow
    it has an attribute on_change which is an event that will
    fire when a change is made
    """
    # how do I test this?

    if pyinotify.valid:
        return pyinotify.INotifyFileChangeMonitor(folder)

    return basic.BasicFileChangeMonitor(folder)
    
